Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.sw
Class Variable

    java.lang.Object
      rdlc.rdl.Field_Named
          rdlc.sw.Field_Base
              rdlc.sw.Variable

All Implemented Interfaces:
  Expression, Field

    public class Variable

extends Field_Base

Abstract representation of an object-oriented variable, including type, name, initialization expression and a description for automatically generated documentation eg javadocs.

Version:
  $Revision: 1.16 $
Author:
  Greg Gibeling

Nested Class Summary

Nested classes/interfaces inherited from interface rdlc.sw.Field
`Field.Access`

Nested classes/interfaces inherited from interface rdlc.rdl.Expression
`Expression.Phase`

Field Summary
`protected java.lang.String` | `description` A description of this variable to put in the generated code.
`protected Expression` | `initializer` The initialization expression for this variable.
`protected Type` | `type` The type of this variable.

Fields inherited from class rdlc.sw.Field_Base
`access`

Fields inherited from class rdlc.rdl.Field_Named
`iName, instance, namespace, rawDynamicID`

Constructor Summary
`Variable(java.lang.String _name, Instance _instance, Field.Access _access, Type _type, java.lang.String _description, Expression _initializer)` Simple constructor, merely saves it's arguments.
`Variable(java.lang.String _name, Instance _instance, Variable _other, java.util.List<Type_Reference> inheritanceList)` Copy constructor.

Method Summary
`Field` | `copy(java.lang.String _name, Instance _instance)` Create a copy of this field in the given instance.
`Field` | `copy(java.lang.String _name, Instance _instance, java.util.List<Type_Reference> inheritanceList)`
`java.lang.String` | `getDescription()` Simple accessor.
`Expression` | `getInitializer()` Simple accessor.
`void` | `getRequirements(CatalogSet<Identifier<Declaration>> requirements)` A normal field has no requirements.
`Type` | `getType()` Simple accessor.
`void` | `setDescription(java.lang.String _description)` Simple accessor.

Methods inherited from class rdlc.sw.Field_Base
`getAccess`

Methods inherited from class rdlc.rdl.Field_Named
`getIdentifier, getRawDynamicID, resolve, setInstance, setNamespace, setRawDynamicID, toString, typeMatch`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface rdlc.rdl.Field
`getIdentifier, setInstance, setRawDynamicID`

Methods inherited from interface rdlc.rdl.Expression
`resolve, setNamespace, typeMatch`

Field Detail

### type

    protected Type type

  The type of this variable.

### description

    protected java.lang.String description

  A description of this variable to put in the generated code.

### initializer

    protected Expression initializer

  The initialization expression for this variable.

Constructor Detail

### Variable

    public Variable(java.lang.String _name,
                    Instance _instance,
                    Field.Access _access,
                    Type _type,
                    java.lang.String _description,
                    Expression _initializer)

  Simple constructor, merely saves it's arguments.

  Parameters:
    `_name` - The name of this variable.
    `_instance` - The instance this variable will be a member of.
    `_access` - The access (protection) for this variable.
    `_type` - The type of this variable.
    `_description` - A description of this variable to put in the generated code.
    `_initializer` - An expression which will be used to initialize this variable.

### Variable

    public Variable(java.lang.String _name,
                    Instance _instance,
                    Variable _other,
                    java.util.List<Type_Reference> inheritanceList)

  Copy constructor.

  Parameters:
    `_name` - The name to use for this copy.
    `_instance` - The instance to add this copy to.
    `_other` - The variable to copy.
    `inheritanceList` - A list of the type references along the inheritance hierarchy.
  See Also:
    `ClassInstance.generateInheritedDefaults()`

Method Detail

### copy

    public Field copy(java.lang.String _name,
                      Instance _instance)

  Description copied from interface: `Field`
  Create a copy of this field in the given instance. This is highly useful during dynamic hierarchy copying and during back end generation.

  Parameters:
    `_name` - The new name to use.
    `_instance` - The instance the copy should be a member of.
  See Also:
    `Field.copy(String, Instance)`

### copy

    public Field copy(java.lang.String _name,
                      Instance _instance,
                      java.util.List<Type_Reference> inheritanceList)

  See Also:
    `Field.copy(String, Instance)`

### getDescription

    public java.lang.String getDescription()

  Simple accessor.

  Returns:
    The description of this variable.

### setDescription

    public void setDescription(java.lang.String _description)

  Simple accessor.

  Parameters:
    `_description` - The description of this variable.

### getType

    public Type getType()

  Simple accessor.

  Returns:
    The type of this variable.

### getInitializer

    public Expression getInitializer()

  Simple accessor.

  Returns:
    The expression which will be used to initialize this variable.

### getRequirements

    public void getRequirements(CatalogSet<Identifier<Declaration>> requirements)

  Description copied from class: `Field_Named`
  A normal field has no requirements.

  Specified by:
    `getRequirements` in interface `Expression`
  Overrides:
    `getRequirements` in class `Field_Named`
  Parameters:
    `requirements` - A list to which this will add the declarations upon which this one relies.
  See Also:
    `Expression.getRequirements(CatalogSet)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD